<?php
// Security check
defined('SECUR_CHECK') or die("Security error");

//Scripts
$site->add_script("/javascript/jquery.blockUI.js");

//Templates
$tpls = array("head.tpl" , "user_options.tpl", "footer.tpl");
$site->set_templates($tpls);

if(isset($_POST['user_options']))
{
    // Update user options with given values
    $validator = new validator();
    $rules = array(
      array(
          'name'    =>  'option_dateformat',
          'label'   =>  'Date format',
          'matches' =>  $conf->dateformats
      )
    );
    if($validator->validate($_POST))
    {
        $user->set_option('brm_user_dateformat', $_POST['option_dateformat']);
    }
}
$smarty->assign("DATEFORMATS", $conf->dateformats);
$smarty->assign("CURRENT_DATEFORMAT", $user->get_option("brm_user_dateformat"));
?>
